#ifndef FONT_H
#define FONT_H

#include "Common.h"
#include "Graphics.h"

namespace GenBen {

struct CharDesc
{
   RectI source;
   uint x_offset, y_offset;
   uint x_advance;
};

struct FontDesc
{
   Texture* font_texture;
   uint line_height;
   CharDesc chars[256];
};

class Font
{
public:
	Font(Graphics* graphics, const string& filename);
	~Font();

	void draw(const string& text, int layer, const VectorI& position, const Color& color = Color());
	
	uint getHeight();
	uint getWidth(const string& text);

private:
	Graphics* graphics;

	FontDesc desc;
};

} // namespace

#endif
